<?php

namespace App\Model\Admin;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Model\Admin\CategoriesModel
 *
 * @property int $id
 * @property string|null $name 分类名称
 * @property int $pid 父id
 * @property int $model_id 关联模型
 * @property int|null $order 排序
 * @property string|null $keywords 关键词
 * @property string|null $description 描述
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereDescription($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereKeywords($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereModelId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereOrder($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel wherePid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\Admin\CategoriesModel whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class CategoriesModel extends Model
{
    protected $table = 'categories';

    public function model()
    {
        return $this->belongsTo('App\Model\Admin\SystemModel','model_id','id');
    }
}
